package com.lovo.cloud.service.impl;

import com.lovo.cloud.model.dos.MovieDO;
import com.lovo.cloud.dao.MovieDAO;
import com.lovo.cloud.redis.RedisDAO;
import com.lovo.cloud.service.MovieService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author luo
 * @since 2020-12-07
 */
@Service
public class MovieServiceImpl extends ServiceImpl<MovieDAO, MovieDO> implements MovieService {

    @Resource
    private MovieDAO movieDAO;

    @Override
    public MovieDO findByMovieName(String movieName) {
        Jedis jedis = RedisDAO.getRedis();

        MovieDO movieDO = movieDAO.selectByName(movieName);

        return movieDO;
    }

}
